<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
	
	<a4j:form id="buySupplierListForm" ajaxSingle="true">
		<a4j:outputPanel id="buySupplierListMsgContainer" ajaxRendered="true">
			<h:messages globalOnly="false" errorClass="msgError" styleClass="message" infoClass="msgInfo" />
		</a4j:outputPanel>
		<a4j:outputPanel id="buySupplierListGridPanel">	
			<rich:panel styleClass="table_add">
			<div style="clear: both;" />
			<rich:extendedDataTable 
			   id="buySupplierListGrid" 
               value="#{trnPurchase.selectHolder.supplierList}" var="supplierList"
               width="350px" height="240px"
               selection="#{trnPurchase.selectHolder.supplierPickSelection}"
               binding="#{trnPurchase.selectHolder.supplierPickTable}"
               selectionMode="single">	
				<rich:column filterBy="#{supplierList.cod}" filterEvent="onkeyup" width="170px">
					<f:facet name="header"><h:outputText value="Codigo" /></f:facet>
					<h:outputText value="#{supplierList.cod}" />
				</rich:column>
				<rich:column width="170px">
					<f:facet name="header"><h:outputText value="Nombre" /></f:facet>
					<h:outputText value="#{convertAssist.getSupplierName(supplierList.id)}" />
				</rich:column>
				<a4j:support reRender="SelectedSupplier" id="extended_table_bean_take_selection"
                    action="#{trnPurchase.selectHolder.takeSelection()}"
                    event="onselectionchange" />
			</rich:extendedDataTable>
			</rich:panel>
			<rich:datascroller align="center" for="buySupplierListGrid"
					maxPages="15" page="#{trnPurchase.scrollerPage}"
					renderIfSinglePage="false" />			   			
			<div style="clear: both;" />
			<h:outputText id="SelectedSupplier" value="#{trnPurchase.selectHolder.supplierPickData}" converter="#{supplierConverter}"/>
		</a4j:outputPanel>
	</a4j:form>

</ui:composition>